<!--{assign var='title' value='登录页面'}-->
<!--{assign var='keywords' value='蔬菜，蔬菜购买，采购，蔬菜采购，新鲜蔬菜，新鲜蔬菜采购，新鲜蔬菜购买，批发，蔬菜批发'}-->
<!--{assign var='description' value='提供新鲜蔬菜采购。'}-->
<!--{include file="header2.0.html" css='/public/css/login.css' js=''}-->
<div class="body">
	<div class="lbg">
		<div class="login">
			<div class="login-t"><h4>用户登录</h4></div>
			<form action="" method="post" id="loginForm">
			<ul class="item">
				<li class="type"><input type="radio" name="usertype" value="email" <!--{if $usertype neq 'phone'}-->checked<!--{/if}-->/>邮箱登录<input type="radio" name="usertype" value="phone" class="ph" <!--{if $usertype eq 'phone'}-->checked<!--{/if}-->/>手机登录</li>
				<li class="mt15"><div><span>账&nbsp;号：</span></div><input type="text" name="username" class="pt" value="<!--{$username}-->"/></li>
				<li class="mt15"><span>密&nbsp;码：</span><input type="password" name="password" class="pt"/></li>
				<li class='lstutas'>
					<p><input type="checkbox" name="weeklogin" value="1"/>&nbsp;</p>
					<p>一周内自动登录</p>
					<p><input type="checkbox" name="remember" value="1" <!--{if $username}-->checked<!--{/if}-->/>&nbsp;</p>
					<p style="width:50px;">记住账号</p>
				</li>
				<li class="btn">
					<button class="lbtn" onclick="return false;">登&nbsp;录</button>
				</li>
			</ul>
			</form>
		</div>
	</div>
</div>
<script>
	var date = new Date();
	var time = date.getTime();
	$('input').bind({
		focus:function(){
		
			$(this).css({'border-color':'#808080'})
		},
		blur:function(){
		
			$(this).css({'border-color':''})
		}
	})
	$('.lbtn').hover(function(){$(this).css({'background-color':'#CCFFFF','color':'#00CCCC'})},function(){$(this).css({'background-color':'#F8F8FF','color':'#999999'})});

	$('.lbtn').click(function(){
		$(this).blur();
		$(this).parents('form').submit();	
	})
	$('#loginForm').submit(function(){
		return checkform();
	})

	function checkform()
	{
		var crutime = $('input[name=crutime]').val();
		var username = $('input[name=username]').val();
		var password = $('input[name=password]').val();
		
		if(typeof(crutime)=="undefined")
		{
			$('.btn').append('<input type="hidden" name="crutime" value="'+time+'"/>');
		}else{
			$('input[name=crutime]').val(time);			
		}
		if(!username || !password)
		{
			$('input[name=username]').val('请输入正确的邮箱用户');return false;			
		}
	}
</script>
<!--{include file="footer2.0.html"}-->